import React, { memo } from "react";
import { Toast, NavBar } from "react-vant";
import { useNavigate } from "react-router";
import { Arrow } from "@react-vant/icons";
import { Empty } from "react-vant";
import style from "./index.module.scss";
const Index: React.FC = memo(() => {
  const navigate = useNavigate();
  return (
    <div className={style.youhuibox}>
      <NavBar
        title="我的优惠卷"
        leftText="返回"
        rightText="按钮"
        onClickLeft={() => navigate(-1)}
        onClickRight={() => Toast("按钮")}
      />
      <div className={style.youhui}>
        <div className={style.youhuizuo}>我有服务优惠码</div>
        <div className={style.youhuiyou}>
          <span onClick={() => navigate("/quduihuan")}>
            去兑换
            <Arrow />
          </span>
        </div>
      </div>
      <Empty
        imageSize={90}
        image={
          <img style={{ width: "50", height: "50px" }} src="./img/image.png" />
        }
        description="暂无可用优惠卷"
      />
    </div>
  );
})

export default Index;
